<html>

<head>
<meta charset="UTF-8">
<title>添加菜单</title>
</head>
<body>
	<script src="/js/system.js"></script>
	<link rel="stylesheet" type="text/css" href="/css/form.css">
	<script type="text/javascript">
		$(".navigation span:first").text("菜单管理");
	</script>
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting" onclick="back(this)">
					<i class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a> 
			</div>
			<div class="form-content">
				<form id="menuForm" method="post">
					<fieldset>
						<table>
							<tr>
								<td>所属菜单：</td>
								<td>
									<select name="parent">
										<option value="">-无-</option>
										<#list fatherMenus as fm>
											<#if father?? && father.id==fm.id>
												<option value="${fm.id}" selected="selected">${fm.text}</option>
											<#elseif menu?? && menu.parent?? && menu.parent.id==fm.id>
												<option value="${fm.id}" selected="selected">${fm.text}</option>
											<#else>
												<option value="${fm.id}">${fm.text}</option>
											</#if>
										</#list>
									</select>
									<span style="color:#696969;font-size: 12px;">Tip：选择“无”时默认为父菜单</span>
								</td>
							</tr>
							<tr>
								<td>菜单名称：</td>
								<td><input type="text" name="text" placeholder="菜单名称不大于10个字符" maxlength="10" value="${(menu.text)?default('')}"></td>
								<td>排序：</td>
								<td><input type="text" name="seq" placeholder="请输入3位以内的数字" maxlength="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'')" value="${(menu.seq)?default('')}"></td>
							</tr>
							<tr>
								<td>菜单路径：</td>
								<td><input type="text" name="href" placeholder="模块名称不大于50个字符" maxlength="50" value="${(menu.href)?default('')}"></td>
								<td>菜单图标：</td>
								<td><input type="text" name="icon" placeholder="请点击选择背景色" value="${(menu.icon)?default('icon-circle1')}"></td>
							</tr>
							<tr>
								<td style="text-align: center;" colspan="4">
									<input type="hidden" name="type" value="${(menu.type)?default('menu')}">
									<input type="hidden" name="id" value="${(menu.id)?default('')}">
									<button class="button" style="padding: 11px 40px;">保存</button>
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>

	</div>
</body>
</html>